package singletonDesign;

import java.awt.*;

/**
 * @Auther: hdc
 * @Date: 2020/12/5 13:37
 * @Description: 饿汉模式，因为是在提前创建好对象，所以不存在多线程同步问题，缺点是不管有没有使用，instance一直占用着内存
 */
public class SingletonHungryDesign {
	private  static  SingletonHungryDesign singletonHungryDesign  = new SingletonHungryDesign();
	private SingletonHungryDesign(){

	}
	public  void  run(){
		System.out.println("(●ˇ∀ˇ●)");
	}

	public static  SingletonHungryDesign getSingletonHungryDesign(){
		return  singletonHungryDesign ;
	}


}
